package com.demon.auto.model.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
 * 认证用户信息
 *
 * @version 1.0
 * @author huangrz
 * @date 2025/02/20 14:45
 */
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
public class UserSecurityDto extends UserDto implements UserDetails {

    // region UserDetails接口实现

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }

    // endregion

}
